package com.zhx.ad.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhx.ad.common.exception.AdException;
import com.zhx.ad.entity.AdPlan;
import com.zhx.ad.client.vo.AdPlanGetRequest;
import com.zhx.ad.client.vo.AdPlanRequest;
import com.zhx.ad.client.vo.AdPlanResponse;

import java.util.List;

/**
 *describe: 
 *
 *@author zhanghaixuan
 *@date 2019/02/02
 **/
public interface IAdPlanService extends IService<AdPlan> {

	AdPlan findByIdAndUserId(String id,String userId);

	List<AdPlan> findAllByIdInAndUserId(List<String> ids,String userId);

	AdPlan findByUserIdAndPlanName(String userId,String planName);

	List<AdPlan> findAllByPlanStatus(Integer status);



	/**
	 * <h2>创建推广计划</h2>
	 * */
	AdPlanResponse createAdPlan(AdPlanRequest request) throws AdException;

	/**
	 * <h2>获取推广计划</h2>
	 * */
	List<AdPlan> getAdPlanByIds(AdPlanGetRequest request) throws AdException;

	/**
	 * <h2>更新推广计划</h2>
	 * */
	AdPlanResponse updateAdPlan(AdPlanRequest request) throws AdException;

	/**
	 * <h2>删除推广计划</h2>
	 * */
	void deleteAdPlan(AdPlanRequest request) throws AdException;
}
